<template>
  <div>
    <md-table v-model="users">
      <md-table-row
        slot="md-table-row"
        slot-scope="{ item }"
      >
        <md-table-cell>{{ item.host }}</md-table-cell>
        <md-table-cell>{{ item.description }}</md-table-cell>
        <md-table-cell>{{ item.priority }}</md-table-cell>

      </md-table-row>
    </md-table>
  </div>
</template>

<script>
  import axios from 'axios';
export default {
  name: "nav-tabs-table",
  data() {
    return {
      selected: [],
      users: []
    };
  },
  mounted() {
    this.getUnhandledAlert();
  },
  methods: {
    getUnhandledAlert() {
      axios({
        methods: 'get',
        url: '/problem/get_current_unhandled_problem.action',
        params: {
          hostId: '', // hostId
          checkList: '', // severity
          currentPage: '1',
          pageSize: '10'
        }
      }).then((res) => {
        console.log(res.data.content.result);
        this.users = res.data.content.result.slice(0, 6);
      })
    }
  }
};
</script>
